package com.example.hibernate.m.session;

import java.io.Serializable;
import java.util.List;

public interface BaseDao<T> {
	
	public void setCacheable(boolean cacheable);
	
	public T getById(Serializable id);
	public T loadById(Serializable id);	

	public void save(Object o);	
	public void update(Object o);
	public void deleteById(Serializable id);
	
	public List<T> findByHql(String hql, Object... values);
	public List<T> findBySql(String sql,Object... values);
	
	public T findUniqueByHql(String hql, Object... values);
	public T findUniqueBySql(String sql,Object... values);
	
	
    public Page<T> pagedSql(String sql,int pageNo,int pageSize,Object...values);	
    public Page<T> pagedHql(String hql,int pageNo,int pageSize,Object...values);
}
